import request from '@/utils/request';
import {toParams} from '@/utils/utils';

export async function queryData(eid) {
  return request(`/api/corporations/${eid}`);
}

export async function querySecret(eid) {
  return request(`/api/openapiauth/${eid}`);
}

export async function refreshSecret(openid,field){
  return request(`/api/openapiauth/${openid}/${field}`,{ method: 'PUT',});
}

export async function updateData(resData) {
  return request(`/api/corporations/${resData.id}`, {
    method: 'PUT',
    data: resData,
  });
}